<template>
  <div>
    <van-list :finished="true" finished-text="没有更多了">
      <van-cell v-for="item in searchList" :key="item.cityId" :title="item.name" @click="cityClick(item.name,item.cityId)"/>
    </van-list>
  </div>
</template>

<script>
export default {
  name: "searchList",
  props: ["searchList"],
  methods: {
    cityClick(name, id) {
      this.$store.commit("changeCityName", name);
      this.$store.commit("changeCityId", id);
      this.$store.commit("changeSelectCity", true);
      this.$router.back();
    }
  }
};
</script>
<style scoped></style>
